* This file runs all Stata analyses found in: 
* Class, Policy Attitudes and U.S. Presidential Voting in the Post-Industrial Era: The Importance of Issue Salience
* Franko & Witko
* Political Research Quarterly
* Date: 05/25/22


*** NOTE: Some of the following code using the ANES data can only be successfully run after getting access to restricted ANES data. Occupation codes, which we use for one of our measures of social class, are considered restricted data by the ANES, meaning an application process is required for researchers who would like access to these data. ANES will not allow us to post this restricted data, or derivatives of the restricted data, for replication purposes. It is still possible to run any of the ANES analyses that do not include the EGP occupation-based measures of class, but the Stata files will have to be edited to exclude any code using the occupation data or EGP measures.


clear all
version 16.1
set more off

* Descriptions and download instructions for required packages.
ssc describe estout



*** Change path to directory where replication files are stored. ***
cd "~/Dropbox/Class/ClassPolicyAttitudesVotingPaper/prq-final-data"

*** IMPORTANT: Create a folder in this directory named 'results' to store 
*** results-related files.



*** Analysis for main text. ***

* GSS analysis.
do 01_setup_class_GSS_egp_crosswalk.do
do 02_setup_class_GSS.do 
do 03_analysis_class_GSS_vote.do 
do 04_analysis_class_GSS_ineq.do 
do 05_analysis_class_GSS_culture.do 
do 06_analysis_class_GSS_race.do 
do 07_analysis_class_GSS_policyvote.do 
* ANES analysis.
do 08_setup_class_ANES_occ_egp_crosswalks.do 
do 09_setup_class_ANES_occ_restrict.do 
do 10_setup_class_ANES_restrict_merge.do 
do 11_setup_class_ANES_egp_crosswalk.do 
do 12_setup_class_ANES.do 
do 13_analysis_class_ANES_vote.do 
do 14_analysis_class_ANES_jobs.do 
do 15_analysis_class_ANES_culture.do 
do 16_analysis_class_ANES_race.do 
do 17_analysis_class_ANES_policyvote.do 
do 18_analysis_class_ANES_salience.do
* Create tables.
do 19_tables_class.do


*** Additional analyses. ***

* Stata can only hold 300 estimates.
clear all

* GSS analysis.
do 01_setup_class_GSS_egp_crosswalk.do
do 02_setup_class_GSS.do 
do A01_analysis_class_GSS_vote-NoIdeoPID.do
do A02_analysis_class_GSS_ineq-NoIdeoPID.do
do A03_analysis_class_GSS_culture-NoIdeoPID.do
do A04_analysis_class_GSS_race-NoIdeoPID.do
do A05_analysis_class_sepmods_GSS.do
* ANES analysis.
do 08_setup_class_ANES_occ_egp_crosswalks.do 
do 09_setup_class_ANES_occ_restrict.do 
do 10_setup_class_ANES_restrict_merge.do 
do 11_setup_class_ANES_egp_crosswalk.do 
do 12_setup_class_ANES.do 
do A06_analysis_class_ANES_vote-NoIdeoPID.do
do A07_analysis_class_ANES_jobs-NoIdeoPID.do
do A08_analysis_class_ANES_culture-NoIdeoPID.do
do A09_analysis_class_ANES_race-NoIdeoPID.do
do A10_analysis_class_sepmods_ANES.do



